package com.liming.user.controller;

import com.liming.common.pojo.vo.product.BrandVO;
import com.liming.common.result.LMResult;
import com.liming.product.client.BrandClient;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 品牌
 *
 * @author liming
 * @date 2025/1/15
 */
@Slf4j
@RestController
@AllArgsConstructor
@Tag(name = "品牌接口-Web")
@RequestMapping("/user/brand")
public class BrandController {

    private final BrandClient brandClient;

    @Operation(
            summary = "列表 - 精选品牌",
            responses = {
                    @ApiResponse(responseCode = "1", description = "获取成功", content = {
                            @Content(mediaType = "application/json", schema = @Schema(implementation = BrandVO.class))
                    })
            }
    )
    @GetMapping
    public LMResult<List<BrandVO>> selectedBrand() {
        return LMResult.success(brandClient.selectedBrand());
    }

}



